package hotel.base.oversea.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhangjinzheng
 * @date 2019-11-22
 */
@Getter
@AllArgsConstructor
public enum CommonEnums {

    //系统相关
    FIELD_NULL(1001, "字段不能为空"),
    DATA_NULL(1002, "数据为空"),
    DATA_HAD(1003, "数据已存在"),

    /*****美团相关 start*****/
    MEITUAN_REDIS_DATA_NULL(2001,"美团酒店redis缓存数据为空！"),
    MEITUAN_ORDER_CHECK_STATE_IN(2002,"美团接口返回用户已入住！"),
    MEITUAN_ORDER_DATA_NULL(2003,"美团酒店未下单！"),
    /*****美团相关 end*****/

    /*****携程相关 start*****/
    SWITCH_REDIS_DATA_NULL(3001,"携程酒店redis缓存数据为空！"),

    //订单code段 3100 开始
    SWITCH_ORDER_REFUSE_OPERATE(3101,"当前订单状态不可接单，请将携程该房型设置库存为空或者满房操作；"),
    SWITCH_ORDER_COMPARE_VALID_PRICE(3102,"当前订单校验异常，请重试!"),
    SWITCH_ORDER_CENCAL_OPERATE(3103,"携程通知取消，系统订单为人工采购订单,系统不做自动处理；"),
    /*****携程相关 end*****/

    LOGIN_ERROR(500, "用户名或密码错误"),
    LOGIN_ERROR_SECRET(500, "token密钥错误"),
    PARAM_ERROR(401, "参数错误"),
    USER_ERROR(500, "获取用户信息失败"),
    LOGOUT_ERROR(500, "退出失败"),
    SYSTEM_ERROR(500, "系统内部错误"),

    //数据库字段state 0  正常  1  异常
    STATE_NORMAL(0, "正常"),
    STATE_ERROR(1, "异常");

    private  int code;
    private  String msg;
}
